$(function(){
  
  /**************************************************/
  /**** Handle Button Product Vertical Scrolling ****/
  /**************************************************/

  var delay = 500,
  t, win= $('#window'),
  up = $('#up'),
  down = $('#down'),
  winH = win.height(), 
  bottom = win[0].scrollHeight - winH;
  //alert('winH : '+ winH+' bottom : ' +bottom);
  up.click(function(){
    t = win.scrollTop();
    if (t - winH <= 0) {
      t = 0;
    } 
	//alert('pu : scroll top : '+(t - winH));
   win.animate({ scrollTop: t - winH}, delay);
  })
 

  down.click(function(){
    var t = win.scrollTop();
    if (t + winH >= bottom) {
      t = bottom;
    } 
    win.animate({ scrollTop: t + winH}, delay);
		//alert('pd : scroll top : '+(t + winH));
  });

  
  
  
});